import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token'
const UserSignKey = 'userSign'

export function getToken() {
  // 从Cookie中获取token
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  // 将token保存到cookie中
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  // 删除cookie中保存的token
  return Cookies.remove(TokenKey)
}

// 从Cookie中获取腾讯im签名
export function getUserSign() {
  return Cookies.get(UserSignKey)
}

// 将腾讯im存储到cookie中
export function setUserSign(userSign) {
  return Cookies.set(UserSignKey,userSign)
}

// 将tim签名从cookie中删除
export function removeUserSign() {
  return Cookies.remove(UserSignKey)
}
